package com.ap.core.business.message.validation.listener;

import com.ap.core.business.info.ValidationInfo;
import com.ap.core.exception.BusinessFailureException;

import java.util.List;

/**
 * User: Ranjit.Singh
 * Validation listener that receives callbacks on successful/rejection of header/message level business rules.
 */
public interface ValidationListener {

    /**
     * On Valid Message
     */
    void onValidMessage() throws BusinessFailureException;

    /**
     * On Rejected Message
     * @param errorCodes - value object for validation info
     */
    void onRejectedMessage(List<ValidationInfo> errorCodes) throws BusinessFailureException;
}
